﻿using System;

namespace Orktane.Components
{
    public interface IConsole : IDisposable
    {
        //event EventHandler ErrorBufferChanged;
        //event EventHandler OutputAvaliable;
        //event EventHandler InputAvaliable;
        event EventHandler CancelKeyPress;

        bool DisableInput { get; set; }

        string DisabledInputText { get; set; }

        string Prompt { get; set; }

        ConsoleColor BackgroundColor { get; set; }

        ConsoleColor ForegroundColor { get; set; }

        string Title { get; set; }

        void ClearOutput();

        void ClearInput();

        void Beep();

        void SetOutBuffer(int length);

        //ConsoleKeyInfo ReadKey();

        void ReadKey(Action<ConsoleKeyInfo> readKeyAction);

        //string ReadLine();

        void ReadLine(Action<string> readLineAction);

        //void SetError(TextWriter newError);

        //void SetIn(TextReader newIn);

        //void SetOut(TextWriter newOut);

        void Write(char[] buffer);

        void Write(char value);

        void Write(int value);

        void Write(object value);

        void Write(string value);

        void Write(string format, params object[] arg);

        void Write(string format, object arg0);

        void Write(char[] buffer, int index, int count);

        void Write(string format, object arg0, object arg1);

        void Write(string format, object arg0, object arg1, object arg2);

        void WriteLine();

        void WriteLine(char value);

        void WriteLine(int value);

        void WriteLine(char[] buffer);

        void WriteLine(object value);

        void WriteLine(string value);

        void WriteLine(string format, params object[] arg);

        void WriteLine(string format, object arg0);

        void WriteLine(string format, object arg0, object arg1);

        void WriteLine(string format, object arg0, object arg1, object arg2);

        //TextWriter Error { get; }

        //TextReader In { get; }

        //TextWriter Out { get; }
    }
}
